package com.ams.mapper;

import com.ams.entity.CpRecord;
import com.ams.entity.QuLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author liuxiaoding
 * @data 2019/7/5
 */
@Mapper
public interface CommonMapper {
    @Select("select * from ims_ewei_shop_cp_record where pid=#{pid} and pnum=#{num}")
    List<CpRecord> getCpByPidAndNum(@Param("pid") Integer pid,@Param("num") Integer num);

    @Select("select type,count from ims_qu_log where pid=#{pid} and  child_id=#{cid}")
    QuLog getQuLogByPidAndCid(@Param("pid") Integer pid,@Param("cid") Integer cid);

    void addCpRecord(CpRecord cpRecord);
}
